package com.example.qxfw.ybzz.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.qxfw.common.entity.zy.TrafficWeatherSta;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
@DS("service")
public interface TrafficWeatherStaMapper extends BaseMapper<TrafficWeatherSta> {

    @Select("select StationID, StationName, Longitude, Latitude from traffic_weather_sta")
    List<TrafficWeatherSta> selectStation();

    @Select("select DISTINCT StationID , StationName, Longitude, Latitude " +
            "from traffic_weather_sta " +
            "where Longitude = #{Longitude} " +
            "and  Latitude = #{Latitude} ")
    TrafficWeatherSta trafficWeatherStaInfo(double Longitude, double Latitude);

}
